﻿using CRMBiz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Text;
using CRMFramework;
using System.Collections;
using Newtonsoft.Json;
using CRMWeb.Utilities.Context;

namespace CRMWeb.WebServices
{
    /// <summary>
    /// Summary description for ApplicationIncomeExpense
    /// </summary>
    public class ApplicationIncomeExpense : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            try
            {
                int input_app_id = string.IsNullOrEmpty(context.Request.QueryString["app_id"]) ? 0 : int.Parse(context.Request.QueryString["app_id"]);

                DataTable dt = ApplicationIncomeExpenseHandler.BindDataTableForApplicationIncomeExpense(input_app_id);
                string strJson = JsonConvert.SerializeObject(dt);

                context.Response.Write(strJson);
            }
            catch (Exception ex)
            {
                ErrorHandler.saveErrorLog(ex,CMSContext.CurrentUser.MemberName);
            }
        }
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}